<template>


<!--	<filmItem v-for="item in datalist" :key="item.id" :mydata="item" @event="handleEvent"></filmItem>-->
<div>
  <div class="centerdata">
    <filmItem  v-for="item in datalist" :key="item.id" :mydata="item" @event="handleEvent" ></filmItem>
  </div>
<!--  <filmDetail :film-data="filmData"></filmDetail>-->
</div>
<!--	<filmDetail :film-data="filmData"></filmDetail>-->


</template>

<script>
import filmItem from "@/components/filmItem";

	export default {
    props:["receive"],
    components: {filmItem},
    name:"test3",
		data() {
			return {
				filmData:"",
				datalist:[
        ]
			}
		},
		created() {
      this.getLexiconList()
		},

		methods: {
			handleEvent(data){

			    this.filmData = data
          this.receive(this.filmData)
			},
			//自定义事件处理器
      getLexiconList() {
        this.$axios.get("/sys/lexicon/lexicons").then(res=>{
            this.datalist = res.data.data;
        })
      }

    }

	}
</script>

<style>
  .centerdata{
    width: 200px;
    height: 600px;
    /*background: #56c626;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    overflow-y: scroll;
  }
  .centerdata::-webkit-scrollbar{
    display: none;
  }
</style>
